<?php

$host = '';
$user = '';
$pass = '';
$db = '';

function GetConnection() {
	
	global $host, $user, $pass, $db;
	
	return new mysqli($host, $user, $pass, $db);
}

function GetPDOConnection() {
	
	global $host, $user, $pass, $db;
	
	try {
		$DBH = new PDO("mysql:host=$host;dbname=$db", $user, $pass);
		return $DBH;
	}  
	catch(PDOException $e) {  
		return null;
	}
}